package com.lagou.rabbitmqComponent;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class RabbitmqListener {

    @RabbitHandler
    @RabbitListener(queues = "TestDirectQueue")
    public void process(String receive) {
        System.out.println("DirectReceiver消费者收到消息  : " + receive);
    }
}
